<cfcomponent extends="Wheels">
	<cffunction name="patients" output="yes">
		<cfargument name="rows" default="15" type="numeric">
		<cfargument name="page" default="1" type="numeric">
		<cfscript>
			startRow = ARGUMENTS.Rows * ARGUMENTS.Page;
			endRow = startRow + 15;
			
			Patients = {
				total = 40,
				page = 40 / 15,
				records = ARGUMENTS.Rows,
				rows = []
			};

			for(intRow = startRow; intRow LTE endRow; intRow += 1) {
				Patients.rows[intRow] = {
					id = '#intRow#',
					cell = [
						'First Name ###intRow#',
						'Last Name ###intRow#',
						'Start Date ###intRow#',
						'End Date ###intRow#'
					]
				};
			}
			provides('json');
			renderWith(Patients);
		</cfscript>
	</cffunction>
	
</cfcomponent>